import http from '../http/index'
import config from '../config/index'

class HomeService {
    async login (params) {
        return await http.getInstance().post(
            config.ApiUrl.login,
            params
        )
    }
    
    async menu (params) {
        return await http.getInstance().get(
            config.ApiUrl.menu,
            params
        )
    }
    
    async roleList (params) {
        return await http.getInstance().get(
            config.ApiUrl.roleList,
            params
        )
    }
    
    async userSave (params) {
        return await http.getInstance().post(
            config.ApiUrl.userSave,
            params
        )
    }
    
    async userput (params) {
        return await http.getInstance().put(
            config.ApiUrl.userput,
            params
        )
    }
    
    async userPage (params) {
        return await http.getInstance().get(
            config.ApiUrl.userPage,
            params
        )
    }
    
    async userDetail (params) {
        return await http.getInstance().get(
            config.ApiUrl.userDetail+params
        )
    }

    async userDelet (params) {
        return await http.getInstance().post(
            config.ApiUrl.userDelet,
            params
        )
    }
}

export default new HomeService()